package com.leeon.generics;

public class BasicGeneratorDemo {
	
	public static void main(String[] args){
		Generator<CounterObject> gen = BasicGenerator.create(CounterObject.class);
		for (int i = 0; i < 10; i++) {
			System.out.println(gen.next().toString());
		}
		
		Generator<CounterObject> gen2 = new BasicGenerator<>(CounterObject.class);
		for (int i = 0; i < 10; i++) {
			System.out.println(gen2.next().toString());
		}
	}
	
	
}
